# A simple Makefile for lib(libxxx.a)  
AR = ar
ARFLAGS = cr
RM = -rm -rf
INCLUDE_DIR = ./../include
CFLAGS = -I$(INCLUDE_DIR) -Wall -g 
LIB = libstu.a
CC = gcc
objects := $(patsubst %.c,%.o,$(wildcard *.c))  
$(objects) : %.o: %.c  #%.h
	gcc -c $(CFLAGS) $< -o $@  

all:$(LIB)
$(LIB):$(objects)
	$(AR) $(ARFLAGS) $@ $(objects); mv $(LIB) ../lib1/; rm ./*.o
clean:
	$(RM) $(LIB) $(objects)
.PHONY: all clean

